package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Objects;

/**
 * 发票类别
 */
@Entity
@Table(name="invoice_type",schema = "lxh_crm", catalog = "")
public class InvoiceType {
    private int invoiceId;
    private String invoiceName;

    @Id
    @Column(name = "invoice_id", nullable = false)
    public int getInvoiceId() {
        return invoiceId;
    }

    public void setInvoiceId(int invoiceId) {
        this.invoiceId = invoiceId;
    }

    @Basic
    @Column(name = "invoice_name", nullable = true, length = 40)
    public String getInvoiceName() {
        return invoiceName;
    }

    public void setInvoiceName(String invoiceName) {
        this.invoiceName = invoiceName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        InvoiceType that = (InvoiceType) o;
        return invoiceId == that.invoiceId &&
                Objects.equals(invoiceName, that.invoiceName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(invoiceId, invoiceName);
    }
}
